package Day23;

import java.util.*;

public class Main {

    public static void main(String[] args) {

        Scanner in = new Scanner(System.in);

        while (in.hasNextLine()) {

            String before = in.nextLine();
            String after = in.nextLine();

            if (before.equals(after)) {
                System.out.println(0);
                continue;
            }



        }

    }

    public static int getValue(int[] gifts, int n) {

        Map<Integer, Integer> map = new HashMap<>();
        Set<Integer> set = new HashSet<>();
        int len = gifts.length / 2;

        for (int g: gifts) {
            set.add(g);
            map.put(g, map.getOrDefault(g, 0) + 1);
        }

        Object[] ints = set.toArray();
        for (int i = 0; i < set.size(); i++) {
            if (map.get(ints[i]) > len) {
                return (Integer)ints[i];
            }
        }

        return 0;
    }

}
